package com.qfedu.fmmall.dao;

import com.qfedu.fmmall.entity.ShoppingCart;
import com.qfedu.fmmall.entity.VO.ShoppingCartVO;
import com.qfedu.fmmall.general.GeneralDAO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ShoppingCartMapper extends GeneralDAO<ShoppingCart> {

    public List<ShoppingCartVO> selectShopcartByUserId(int userId);

    public int updateCartnumByCartId(@Param("cartId") int cartId,
                                     @Param("cartNum") int cartNum);//数据库要进行两个及以上的操作，需要通过@Param指定

    public List<ShoppingCartVO> selectShopcartByCids(List<Integer> cids);


}